package com.xjgc.msibase.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xjgc.msibase.entity.MsiServerTask;
import com.xjgc.msibase.mapper.MsiExoSystemServerMapper;
import com.xjgc.msibase.mapper.MsiServerTaskMapper;
import com.xjgc.msibase.service.IMsiServerTaskService;
import com.xjgc.msibase.vo.MsiServerTaskExoServer;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description: 中间库WebService服务任务号
 * @Author: 小逗号
 * @Date: 2023-11-03
 * @Version: V1.0
 */
@Service
public class MsiServerTaskServiceImpl extends ServiceImpl<MsiServerTaskMapper, MsiServerTask> implements IMsiServerTaskService {

    @Resource
    private MsiExoSystemServerMapper msiExoSystemServerMapper;

    @Override
    public MsiServerTaskExoServer getTaskExoServer(String serverCode, String taskCode) {
        return baseMapper.selectTaskExoServer(serverCode, taskCode);
    }

    @Override
    public IPage<MsiServerTaskExoServer> getTaskExoServerPage(IPage<MsiServerTaskExoServer> page, MsiServerTaskExoServer queryAo) {
        return baseMapper.selectTaskExoServerPage(page,queryAo);
    }

    @Override
    public List<MsiServerTask> selectByMainId(String mainId) {
        return baseMapper.selectList(new LambdaQueryWrapper<MsiServerTask>().eq(MsiServerTask::getServerId, mainId));
    }


}
